#ifndef CCONFIGURER_H
#define CCONFIGURER_H
// #include "pch.h"

#include "common/commonDefFun.h"
#include "Plugins/initReader/SimpleIni.h"

#pragma warning( disable: 4251 )
namespace libtool_sdk
{

// #define INI_FILE_NAME "libcvos_vfr.ini"

	class TOOL_SDK_API cConfigurer
	{
	private:
		cConfigurer();
		cConfigurer(const cConfigurer&) = delete;
		cConfigurer& operator=(const cConfigurer&) = delete;

	public:
		~cConfigurer();

		static cConfigurer& get_instance()
		{
			static cConfigurer configurerObj;
			return configurerObj;
		}

		bool loadIniFile(const char* fileName);
		void createIniFile(const char* fileName);

		bool get_section_value(const char* sectionName, const char* keyName, char* valueBuf, int* bufLen);
		bool set_section_value(const char* sectionName, const char* keyName, const char* value);

		bool get_section_value_int(const char * sectionName, const char * keyName, int * value);
		bool set_section_value_int(const char *sectionName, const char *keyName, int value);

	private:
		CSimpleIniA m_iniParser;

		bool m_bInit;

		char m_strIniFile[256];
	};

}
#endif // CCONFIGURER_H
